<HTML><HEAD><TITLE>library(ordset)</TITLE></HEAD><BODY>
[ <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]<H1>library(ordset)</H1>
Ordered set manipulation utilities
<H2>Predicates</H2>
<BLOCKQUOTE>
<DL>
<DT><A HREF="is_ordset-1.html"><STRONG>is_ordset(?Term)</STRONG></A></DT>
<DD>Checks whether term is an ordered set in the sense of lib(ordset)</DD>
<DT><A HREF="list_to_ord_set-2.html"><STRONG>list_to_ord_set(+List, -Set)</STRONG></A></DT>
<DD>Converts a list to a set</DD>
<DT><A HREF="ord_add_element-3.html"><STRONG>ord_add_element(+Set1, +Element, -Set2)</STRONG></A></DT>
<DD>Adds an element to a set</DD>
<DT><A HREF="ord_compare-3.html"><STRONG>ord_compare(-Rel, +Set1, +Set2)</STRONG></A></DT>
<DD>Rel is the ordering relationship between Set1 and Set2</DD>
<DT><A HREF="ord_del_element-3.html"><STRONG>ord_del_element(+Set, ?Term, -Remainder)</STRONG></A></DT>
<DD>Remainder is the set Set without the element Term</DD>
<DT><A HREF="ord_disjoint-2.html"><STRONG>ord_disjoint(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether two sets are disjoint</DD>
<DT><A HREF="ord_disjoint_union-3.html"><STRONG>ord_disjoint_union(+Set1, +Set2, -Union)</STRONG></A></DT>
<DD>Computes the union of Set1 and Set2 when they are disjoint</DD>
<DT><A HREF="ord_insert-3.html"><STRONG>ord_insert(+Set1, +Element, -Set2)</STRONG></A></DT>
<DD>Adds an element to a set</DD>
<DT><A HREF="ord_intersect-2.html"><STRONG>ord_intersect(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether two sets have a non-empty intersection</DD>
<DT><A HREF="ord_intersect-3.html"><STRONG>ord_intersect(+Set1, +Set2, -Intersection)</STRONG></A></DT>
<DD>Computes the intersection of two sets</DD>
<DT><A HREF="ord_intersection-2.html"><STRONG>ord_intersection(+Sets, -Intersection)</STRONG></A></DT>
<DD>Computes the intersection of all sets in Sets</DD>
<DT><A HREF="ord_intersection-3.html"><STRONG>ord_intersection(+Set1, +Set2, -Intersection)</STRONG></A></DT>
<DD>Computes the intersection of two sets</DD>
<DT><A HREF="ord_intersection-5.html"><STRONG>ord_intersection(+Set1, +Set2, -Intersection, -Only1, -Only2)</STRONG></A></DT>
<DD>Computes the intersection and the differences of two sets</DD>
<DT><A HREF="ord_memberchk-2.html"><STRONG>ord_memberchk(?Term, +Set)</STRONG></A></DT>
<DD>Checks whether Term is a member of Set</DD>
<DT><A HREF="ord_nonmember-2.html"><STRONG>ord_nonmember(?Term, +Set)</STRONG></A></DT>
<DD>Term is not a member of Set</DD>
<DT><A HREF="ord_proper_subset-2.html"><STRONG>ord_proper_subset(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether Set1 is a proper subset of Set2</DD>
<DT><A HREF="ord_proper_superset-2.html"><STRONG>ord_proper_superset(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether Set1 is a proper superset of Set2</DD>
<DT><A HREF="ord_selectchk-3.html"><STRONG>ord_selectchk(?Term, +Set, -Remainder)</STRONG></A></DT>
<DD>Set contains Term, and Remainder is the set Set without Term</DD>
<DT><A HREF="ord_seteq-2.html"><STRONG>ord_seteq(+Set1, +Set2)</STRONG></A></DT>
<DD>Compares two sets for identity</DD>
<DT><A HREF="ord_subset-2.html"><STRONG>ord_subset(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether Set1 is a subset of Set2</DD>
<DT><A HREF="ord_subtract-3.html"><STRONG>ord_subtract(+Set1, +Set2, -Difference)</STRONG></A></DT>
<DD>Subtracts Set2 from Set1</DD>
<DT><A HREF="ord_superset-2.html"><STRONG>ord_superset(+Set1, +Set2)</STRONG></A></DT>
<DD>Checks whether Set1 is a superset of Set2</DD>
<DT><A HREF="ord_symdiff-3.html"><STRONG>ord_symdiff(+Set1, +Set2, -Difference)</STRONG></A></DT>
<DD>Computes the symmetric difference of Set1 and Set2</DD>
<DT><A HREF="ord_union-2.html"><STRONG>ord_union(+Sets, -Union)</STRONG></A></DT>
<DD>Computes the union of all sets in Sets</DD>
<DT><A HREF="ord_union-3.html"><STRONG>ord_union(+Set1, +Set2, -Union)</STRONG></A></DT>
<DD>Computes the union of Set1 and Set2</DD>
<DT><A HREF="ord_union-4.html"><STRONG>ord_union(+Set1, +Set2, -Union, -New)</STRONG></A></DT>
<DD>Computes the union and difference of Set2 and Set1</DD>
</DL>
</BLOCKQUOTE>
<H2>Description</H2>
<P>	In this module, sets are represented by ordered lists with no
	duplicates.  Thus the set {c,r,a,f,t} would be [a,c,f,r,t].  The
	ordering is defined by the @< family of term comparison predicates,
	which is the ordering used by sort/2 and setof/3.
	</P><P>
	The benefit of the ordered representation is that the elementary
	set operations can be done in time proportional to the Sum of
	the argument sizes rather than their Product.  Some of the
	unordered set routines, such as member/2, length/2, select/3
	can be used unchanged.
	</P><P>
	The implementation allows nonground set elements. The only problem
	with this is that a set can lose its set property as a result of
	variable bindings: unifications can create duplicates or change
	the element's position in the term order. The set can be repaired
	by applying list_to_ord_set/2 again, i.e. re-sorting it.
	</P><P>
	Note that the predicates of this library do no error checking.
	When called with the wrong argument types or modes, the result is
	undefined.
	</P>
    
<H2>About</H2><UL COMPACT>
<LI><STRONG>Author: </STRONG>R.A.O'Keefe and Joachim Schimpf
<LI><STRONG>Copyright &copy; </STRONG>This file is in the public domain
<LI><STRONG>Date: </STRONG>$Date: 2009/02/19 05:38:37 $
</UL>
<HR>Generated from ordset.eci on 2009-05-27 01:25
</BODY></HTML>
